public class Zuoye {
    public static void main(String[] args) {
        int num = 456;
        int dig1 = num % 10;
        num /= 10;
        int dig2= num % 10;
        num /= 10;
        int dig3 =num;
        int result =dig1*100+dig2*10+dig3;
        System.out.println(result);
    }
}
